package com.xiaomazi.edu.service;

import com.xiaomazi.common.utils.R;
import com.xiaomazi.edu.entity.Chapter;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xiaomazi.edu.vo.ChapterResult;

import java.util.List;

public interface ChapterService extends IService<Chapter>{


    /**
     * 根据课程Id查询出章节列表数据
     * @param courseId 课程Id
     * @return ChapterResult集合
     */
    List<ChapterResult> getChapterInfoByCourseId(String courseId);

    /**
     * 删除章节
     * @param chapterId 章节Id
     * @return ok error
     */
    R removeChapterAndVideo(String chapterId);

    /**
     * 根据课程id删除所有的章节
     * @param courseId 课程id
     */
    void deleteChapterByCourseId(String courseId);
}
